import 'package:flutter/material.dart';
import 'package:flutter_swiper_null_safety/flutter_swiper_null_safety.dart';

class ProductSwiper extends StatefulWidget {
  List swiperlist;
  ProductSwiper({Key? key, required List this.swiperlist}) : super(key: key);

  @override
  _ProductSwiperState createState() => _ProductSwiperState();
}

class _ProductSwiperState extends State<ProductSwiper> {
  @override
  Widget build(BuildContext context) {
    return Swiper(
      itemBuilder: (BuildContext context, int index) {
        return Image.network(
          widget.swiperlist[index]
        );
      }, 
      autoplay: true,
      autoplayDelay: 3000,
      pagination: SwiperPagination(),
      itemCount: widget.swiperlist.length
    );
  }
}